Skip to content

Fix list of core cache warmers #10853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2019
Merged

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Jan 7, 2019

Currently there are many core cache warmers missing in the documentation:

Symfony Container Services Tagged with "kernel.cache_warmer" Tag
================================================================

 ----------------------------------------------------- ---------- -----------------------------------------------------------------------
  Service ID                                            priority   Class name
 ----------------------------------------------------- ---------- -----------------------------------------------------------------------
  annotations.cache_warmer                                         Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer
  doctrine.orm.proxy_cache_warmer                                  Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer
  router.cache_warmer                                              Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer
  serializer.mapping.cache_warmer                                  Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer
  templating.cache_warmer.template_paths                20         Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer
  translation.warmer                                               Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer
  twig.cache_warmer                                                Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer
  twig.template_cache_warmer                                       Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer
  validator.mapping.cache_warmer                                   Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer
 ----------------------------------------------------- ---------- -----------------------------------------------------------------------

@javiereguiluz javiereguiluz added this to the 3.4 milestone Jan 9, 2019
@javiereguiluz javiereguiluz merged commit 1f5fc2a into symfony:3.4 Jan 9, 2019
javiereguiluz added a commit that referenced this pull request Jan 9, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

Fix list of core cache warmers

Currently there are many core cache warmers missing in the documentation:

```bash
Symfony Container Services Tagged with "kernel.cache_warmer" Tag
================================================================

 ----------------------------------------------------- ---------- -----------------------------------------------------------------------
  Service ID                                            priority   Class name
 ----------------------------------------------------- ---------- -----------------------------------------------------------------------
  annotations.cache_warmer                                         Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer
  doctrine.orm.proxy_cache_warmer                                  Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer
  router.cache_warmer                                              Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer
  serializer.mapping.cache_warmer                                  Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer
  templating.cache_warmer.template_paths                20         Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer
  translation.warmer                                               Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer
  twig.cache_warmer                                                Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer
  twig.template_cache_warmer                                       Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer
  validator.mapping.cache_warmer                                   Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer
 ----------------------------------------------------- ---------- -----------------------------------------------------------------------
```

Commits
-------

1f5fc2a Fix list of core cache warmers
@javiereguiluz
Copy link
Member

@alexander-schranz thanks for this contribution. Sadly, solving this is more complicated than it looks in modern Symfony versions. Since apps are now much more modular, the list of warmers depends on the components/bundles you pick. For example, my list of warmers for the Symfony Demo app is different that the list you showed here:

$ php bin/console debug:container --tag=kernel.cache_warmer

Symfony Container Services Tagged with "kernel.cache_warmer" Tag
================================================================

 --------------------------------- --------------------------------------------------------------------
  Service ID                        Class name
 --------------------------------- --------------------------------------------------------------------
  annotations.cache_warmer          Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer
  doctrine.orm.proxy_cache_warmer   Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer
  router.cache_warmer               Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer
  translation.warmer                Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer
  twig.cache_warmer                 Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer
  twig.template_cache_warmer        Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer
  validator.mapping.cache_warmer    Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer
 --------------------------------- --------------------------------------------------------------------

So, to avoid confusion and to make docs easier to maintain, I've merged your PR but, after that, I've replaced in 8953c9d the table of cache warmers with the debug:container command.

Thanks for understanding!

@alexander-schranz alexander-schranz deleted the patch-1 branch January 9, 2019 11:44
@alexander-schranz
Copy link
Contributor Author

alexander-schranz commented Jan 9, 2019

@javiereguiluz sounds reasonable did stumble over this because of a symfony certification question in the university where TemplateCacheWarmer was an answer possibility but not listed in the docs and was not checked by me. So I was confused why my answer wasn't correct 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants